using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WPCoco
{
    /// <summary>
    /// Protocol for clases that will be serialized via key-value strategy
    /// </summary>
    public interface IDictionarySerializable
    {
        /// <summary>
        /// Return a dictionary containing data to serialize
        /// </summary>
        /// <returns></returns>
        IDictionary<string, object> GetDictionary();

        /// <summary>
        /// Initialize the object with data from one dictionary
        /// </summary>
        /// <param name="data">Dictionary of data</param>
        void FromDictionary(IDictionary<string, object> data);
    }
}
